Skip to content

Conversation

bunsenstraat
Copy link
Collaborator

No description provided.

Copy link

netlify bot commented Oct 7, 2025

Deploy Preview for reliable-cocada-166884 ready!

Name Link
🔨 Latest commit b0c3016
🔍 Latest deploy log https://app.netlify.com/projects/reliable-cocada-166884/deploys/68e65b4dbb36a100075933a6
😎 Deploy Preview https://deploy-preview-6434--reliable-cocada-166884.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

ci-bot and others added 11 commits October 8, 2025 13:19
Lock files (yarn.lock, package-lock.json) are now reloaded fresh each time
a package version needs to be resolved. This ensures that changes to lock
files during the session are picked up immediately.

Previously, lock files were parsed once during ImportResolver initialization
and cached. If a user added or modified a lock file, the stale cached versions
would be used, causing the wrong package version to be resolved.

Changes:
- Clear lockFileVersions map before each reload
- Call loadLockFileVersions() in resolvePackageVersion() before checking cache
- This has minimal overhead as lock files are small text files
Added comprehensive tests for lock file version resolution:

Group 5 (yarn.lock):
- Test initial yarn.lock resolution (4.9.6)
- Test yarn.lock change detection (4.9.6 → 4.7.3)

Group 6 (package-lock.json):
- Test initial package-lock.json resolution (4.8.1)
- Test package-lock.json change detection (4.8.1 → 4.6.0)

Both test groups verify that:
1. Lock file versions are used correctly
2. Changes to lock files are picked up immediately
3. Re-compilation uses the new version from updated lock file

Tests delete .deps folder between compilations to force fresh resolution,
demonstrating that the ImportResolver now reloads lock files dynamically.
Updated lock file change detection tests to properly modify existing files:
- Use openFile() to open the lock file
- Use setEditorValue() to change its content
- Use right-click + delete menu to remove .deps folder (instead of execute())

This follows the standard pattern used in other E2E tests like code_format.test.ts
and ensures the file modification is properly handled by the file manager.
@yann300 yann300 added the WIP label Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants